{ "openapi": "3.0.1", "info": { "title": "Accounts.Api", "version": "1.0" }, "paths": { "/api/accounts/login": { "post": { "tags": [ "Account" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthViaPasswordRequestContract" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AuthViaPasswordRequestContract" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/AuthViaPasswordRequestContract" } } } }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AuthTokenResponseContract" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AuthTokenResponseContract" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AuthTokenResponseContract" } } } }, "403": { "description": "Forbidden", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/accounts": { "post": { "tags": [ "Account" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePasswordAccountRequestContract" } }, "text/json": { "schema": { "$ref": "#/components/schemas/CreatePasswordAccountRequestContract" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/CreatePasswordAccountRequestContract" } } } }, "responses": { "200": { "description": "Success" }, "400": { "description": "Bad Request", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } } } } }, "/api/accounts/{id}": { "get": { "tags": [ "Account" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountDto" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/accounts/me": { "get": { "tags": [ "Account" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/AccountDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/AccountDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/AccountDto" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/accounts/claims": { "get": { "tags": [ "Claims" ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/GetClaimsResponseDto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/GetClaimsResponseDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/GetClaimsResponseDto" } } } }, "401": { "description": "Unauthorized", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "components": { "schemas": { "AccountDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string", "nullable": true }, "username": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AuthTokenResponseContract": { "type": "object", "properties": { "authToken": { "type": "string", "nullable": true } }, "additionalProperties": false }, "AuthViaPasswordRequestContract": { "type": "object", "properties": { "email": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ClaimDto": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "value": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CreatePasswordAccountRequestContract": { "type": "object", "properties": { "email": { "type": "string", "nullable": true }, "password": { "type": "string", "nullable": true }, "username": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ErrorResponse": { "type": "object", "properties": { "statusCode": { "type": "integer", "format": "int32" }, "error": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true }, "errors": { "type": "object", "additionalProperties": { "type": "string" }, "nullable": true }, "failures": { "type": "array", "items": { "type": "string" }, "nullable": true } }, "additionalProperties": false }, "GetClaimsResponseDto": { "type": "object", "properties": { "claims": { "type": "array", "items": { "$ref": "#/components/schemas/ClaimDto" }, "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "type": "apiKey", "description": "Enter 'Bearer {token}'", "name": "Authorization", "in": "header" } } }, "security": [ { "Bearer": [] } ] }